package com.qf.hospital.system.exception;

import com.qf.hospital.system.enums.HospitalEnum;

public class HospitalEx extends RuntimeException {

    private Integer code;

    public HospitalEx(Integer code,String message) {
        super(message);
        this.code = code;
    }

    public HospitalEx(HospitalEnum hospitalEnum) {
        super(hospitalEnum.getMsg());
        this.code = hospitalEnum.getCode();
    }

    public Integer getCode() {
        return code;
    }
}
